\(\int \frac {\log (e (f (a+b x)^p (c+d x)^q)^r)}{(g+h x)^2} \, dx\) [31]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 128 \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=\frac {b p r \log (a+b x)}{h (b g-a h)}+\frac {d q r \log (c+d x)}{h (d g-c h)}-\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{h (g+h x)}-\frac {b p r \log (g+h x)}{h (b g-a h)}-\frac {d q r \log (g+h x)}{h (d g-c h)} \]

[Out]

b*p*r*ln(b*x+a)/h/(-a*h+b*g)+d*q*r*ln(d*x+c)/h/(-c*h+d*g)-ln(e*(f*(b*x+a)^p*(d*x+c)^q)^r)/h/(h*x+g)-b*p*r*ln(h
*x+g)/h/(-a*h+b*g)-d*q*r*ln(h*x+g)/h/(-c*h+d*g)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2581, 36, 31} \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=-\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{h (g+h x)}+\frac {b p r \log (a+b x)}{h (b g-a h)}-\frac {b p r \log (g+h x)}{h (b g-a h)}+\frac {d q r \log (c+d x)}{h (d g-c h)}-\frac {d q r \log (g+h x)}{h (d g-c h)} \]

[In]

Int[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]/(g + h*x)^2,x]

[Out]

(b*p*r*Log[a + b*x])/(h*(b*g - a*h)) + (d*q*r*Log[c + d*x])/(h*(d*g - c*h)) - Log[e*(f*(a + b*x)^p*(c + d*x)^q
)^r]/(h*(g + h*x)) - (b*p*r*Log[g + h*x])/(h*(b*g - a*h)) - (d*q*r*Log[g + h*x])/(h*(d*g - c*h))

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2581

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]*((g_.) + (h_.)*(x_))^(m_.),
 x_Symbol] :> Simp[(g + h*x)^(m + 1)*(Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]/(h*(m + 1))), x] + (-Dist[b*p*(r/(h
*(m + 1))), Int[(g + h*x)^(m + 1)/(a + b*x), x], x] - Dist[d*q*(r/(h*(m + 1))), Int[(g + h*x)^(m + 1)/(c + d*x
), x], x]) /; FreeQ[{a, b, c, d, e, f, g, h, m, p, q, r}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{h (g+h x)}+\frac {(b p r) \int \frac {1}{(a+b x) (g+h x)} \, dx}{h}+\frac {(d q r) \int \frac {1}{(c+d x) (g+h x)} \, dx}{h} \\ & = -\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{h (g+h x)}-\frac {(b p r) \int \frac {1}{g+h x} \, dx}{b g-a h}+\frac {\left (b^2 p r\right ) \int \frac {1}{a+b x} \, dx}{h (b g-a h)}-\frac {(d q r) \int \frac {1}{g+h x} \, dx}{d g-c h}+\frac {\left (d^2 q r\right ) \int \frac {1}{c+d x} \, dx}{h (d g-c h)} \\ & = \frac {b p r \log (a+b x)}{h (b g-a h)}+\frac {d q r \log (c+d x)}{h (d g-c h)}-\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{h (g+h x)}-\frac {b p r \log (g+h x)}{h (b g-a h)}-\frac {d q r \log (g+h x)}{h (d g-c h)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.73 \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=\frac {-\frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{g+h x}+\frac {b p r (\log (a+b x)-\log (g+h x))}{b g-a h}+\frac {d q r (\log (c+d x)-\log (g+h x))}{d g-c h}}{h} \]

[In]

Integrate[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]/(g + h*x)^2,x]

[Out]

(-(Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]/(g + h*x)) + (b*p*r*(Log[a + b*x] - Log[g + h*x]))/(b*g - a*h) + (d*q*
r*(Log[c + d*x] - Log[g + h*x]))/(d*g - c*h))/h

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(478\) vs. \(2(128)=256\).

Time = 84.84 (sec) , antiderivative size = 479, normalized size of antiderivative = 3.74

method result size
parallelrisch \(-\frac {\ln \left (h x +g \right ) x a b c d \,g^{2} h p r +\ln \left (h x +g \right ) x a b c d \,g^{2} h q r -\ln \left (d x +c \right ) a b \,c^{2} g^{2} h q r -\ln \left (h x +g \right ) a^{2} c d \,g^{2} h q r -\ln \left (h x +g \right ) a b \,c^{2} g^{2} h p r +\ln \left (h x +g \right ) a b c d \,g^{3} p r +\ln \left (h x +g \right ) a b c d \,g^{3} q r -x \ln \left (e \left (f \left (b x +a \right )^{p} \left (d x +c \right )^{q}\right )^{r}\right ) a b c d \,g^{2} h -\ln \left (b x +a \right ) a^{2} c d \,g^{2} h p r -\ln \left (b x +a \right ) x \,a^{2} c d g \,h^{2} p r -\ln \left (d x +c \right ) x a b \,c^{2} g \,h^{2} q r -\ln \left (h x +g \right ) x \,a^{2} c d g \,h^{2} q r -\ln \left (h x +g \right ) x a b \,c^{2} g \,h^{2} p r -x \ln \left (e \left (f \left (b x +a \right )^{p} \left (d x +c \right )^{q}\right )^{r}\right ) a^{2} c^{2} h^{3}+\ln \left (b x +a \right ) x \,a^{2} c^{2} h^{3} p r +\ln \left (d x +c \right ) x \,a^{2} c^{2} h^{3} q r +\ln \left (b x +a \right ) a^{2} c^{2} g \,h^{2} p r +\ln \left (d x +c \right ) a^{2} c^{2} g \,h^{2} q r +x \ln \left (e \left (f \left (b x +a \right )^{p} \left (d x +c \right )^{q}\right )^{r}\right ) a^{2} c d g \,h^{2}+x \ln \left (e \left (f \left (b x +a \right )^{p} \left (d x +c \right )^{q}\right )^{r}\right ) a b \,c^{2} g \,h^{2}}{\left (a c \,h^{2}-a d g h -b c g h +b d \,g^{2}\right ) h \left (h x +g \right ) a c g}\) \(479\)

[In]

int(ln(e*(f*(b*x+a)^p*(d*x+c)^q)^r)/(h*x+g)^2,x,method=_RETURNVERBOSE)

[Out]

-(ln(h*x+g)*x*a*b*c*d*g^2*h*p*r+ln(h*x+g)*x*a*b*c*d*g^2*h*q*r-ln(d*x+c)*a*b*c^2*g^2*h*q*r-ln(h*x+g)*a^2*c*d*g^
2*h*q*r-ln(h*x+g)*a*b*c^2*g^2*h*p*r+ln(h*x+g)*a*b*c*d*g^3*p*r+ln(h*x+g)*a*b*c*d*g^3*q*r-x*ln(e*(f*(b*x+a)^p*(d
*x+c)^q)^r)*a*b*c*d*g^2*h-ln(b*x+a)*a^2*c*d*g^2*h*p*r-ln(b*x+a)*x*a^2*c*d*g*h^2*p*r-ln(d*x+c)*x*a*b*c^2*g*h^2*
q*r-ln(h*x+g)*x*a^2*c*d*g*h^2*q*r-ln(h*x+g)*x*a*b*c^2*g*h^2*p*r-x*ln(e*(f*(b*x+a)^p*(d*x+c)^q)^r)*a^2*c^2*h^3+
ln(b*x+a)*x*a^2*c^2*h^3*p*r+ln(d*x+c)*x*a^2*c^2*h^3*q*r+ln(b*x+a)*a^2*c^2*g*h^2*p*r+ln(d*x+c)*a^2*c^2*g*h^2*q*
r+x*ln(e*(f*(b*x+a)^p*(d*x+c)^q)^r)*a^2*c*d*g*h^2+x*ln(e*(f*(b*x+a)^p*(d*x+c)^q)^r)*a*b*c^2*g*h^2)/(a*c*h^2-a*
d*g*h-b*c*g*h+b*d*g^2)/h/(h*x+g)/a/c/g

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 280 vs. \(2 (128) = 256\).

Time = 72.61 (sec) , antiderivative size = 280, normalized size of antiderivative = 2.19 \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=-\frac {{\left (b d g^{2} + a c h^{2} - {\left (b c + a d\right )} g h\right )} r \log \left (f\right ) - {\left ({\left (b d g h - b c h^{2}\right )} p r x + {\left (a d g h - a c h^{2}\right )} p r\right )} \log \left (b x + a\right ) - {\left ({\left (b d g h - a d h^{2}\right )} q r x + {\left (b c g h - a c h^{2}\right )} q r\right )} \log \left (d x + c\right ) + {\left ({\left ({\left (b d g h - b c h^{2}\right )} p + {\left (b d g h - a d h^{2}\right )} q\right )} r x + {\left ({\left (b d g^{2} - b c g h\right )} p + {\left (b d g^{2} - a d g h\right )} q\right )} r\right )} \log \left (h x + g\right ) + {\left (b d g^{2} + a c h^{2} - {\left (b c + a d\right )} g h\right )} \log \left (e\right )}{b d g^{3} h + a c g h^{3} - {\left (b c + a d\right )} g^{2} h^{2} + {\left (b d g^{2} h^{2} + a c h^{4} - {\left (b c + a d\right )} g h^{3}\right )} x} \]

[In]

integrate(log(e*(f*(b*x+a)^p*(d*x+c)^q)^r)/(h*x+g)^2,x, algorithm="fricas")

[Out]

-((b*d*g^2 + a*c*h^2 - (b*c + a*d)*g*h)*r*log(f) - ((b*d*g*h - b*c*h^2)*p*r*x + (a*d*g*h - a*c*h^2)*p*r)*log(b
*x + a) - ((b*d*g*h - a*d*h^2)*q*r*x + (b*c*g*h - a*c*h^2)*q*r)*log(d*x + c) + (((b*d*g*h - b*c*h^2)*p + (b*d*
g*h - a*d*h^2)*q)*r*x + ((b*d*g^2 - b*c*g*h)*p + (b*d*g^2 - a*d*g*h)*q)*r)*log(h*x + g) + (b*d*g^2 + a*c*h^2 -
 (b*c + a*d)*g*h)*log(e))/(b*d*g^3*h + a*c*g*h^3 - (b*c + a*d)*g^2*h^2 + (b*d*g^2*h^2 + a*c*h^4 - (b*c + a*d)*
g*h^3)*x)

Sympy [F(-1)]

Timed out. \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=\text {Timed out} \]

[In]

integrate(ln(e*(f*(b*x+a)**p*(d*x+c)**q)**r)/(h*x+g)**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.96 \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=\frac {{\left (b f p {\left (\frac {\log \left (b x + a\right )}{b g - a h} - \frac {\log \left (h x + g\right )}{b g - a h}\right )} + d f q {\left (\frac {\log \left (d x + c\right )}{d g - c h} - \frac {\log \left (h x + g\right )}{d g - c h}\right )}\right )} r}{f h} - \frac {\log \left (\left ({\left (b x + a\right )}^{p} {\left (d x + c\right )}^{q} f\right )^{r} e\right )}{{\left (h x + g\right )} h} \]

[In]

integrate(log(e*(f*(b*x+a)^p*(d*x+c)^q)^r)/(h*x+g)^2,x, algorithm="maxima")

[Out]

(b*f*p*(log(b*x + a)/(b*g - a*h) - log(h*x + g)/(b*g - a*h)) + d*f*q*(log(d*x + c)/(d*g - c*h) - log(h*x + g)/
(d*g - c*h)))*r/(f*h) - log(((b*x + a)^p*(d*x + c)^q*f)^r*e)/((h*x + g)*h)

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.49 \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=\frac {b^{2} p r \log \left ({\left | -b x - a \right |}\right )}{b^{2} g h - a b h^{2}} + \frac {d^{2} q r \log \left ({\left | d x + c \right |}\right )}{d^{2} g h - c d h^{2}} - \frac {p r \log \left (b x + a\right )}{h^{2} x + g h} - \frac {q r \log \left (d x + c\right )}{h^{2} x + g h} - \frac {{\left (b d g p r - b c h p r + b d g q r - a d h q r\right )} \log \left (h x + g\right )}{b d g^{2} h - b c g h^{2} - a d g h^{2} + a c h^{3}} - \frac {r \log \left (f\right ) + \log \left (e\right )}{h^{2} x + g h} \]

[In]

integrate(log(e*(f*(b*x+a)^p*(d*x+c)^q)^r)/(h*x+g)^2,x, algorithm="giac")

[Out]

b^2*p*r*log(abs(-b*x - a))/(b^2*g*h - a*b*h^2) + d^2*q*r*log(abs(d*x + c))/(d^2*g*h - c*d*h^2) - p*r*log(b*x +
 a)/(h^2*x + g*h) - q*r*log(d*x + c)/(h^2*x + g*h) - (b*d*g*p*r - b*c*h*p*r + b*d*g*q*r - a*d*h*q*r)*log(h*x +
 g)/(b*d*g^2*h - b*c*g*h^2 - a*d*g*h^2 + a*c*h^3) - (r*log(f) + log(e))/(h^2*x + g*h)

Mupad [B] (verification not implemented)

Time = 2.29 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.19 \[ \int \frac {\log \left (e \left (f (a+b x)^p (c+d x)^q\right )^r\right )}{(g+h x)^2} \, dx=\frac {\ln \left (g+h\,x\right )\,\left (b\,c\,h\,p\,r-g\,\left (b\,d\,p\,r+b\,d\,q\,r\right )+a\,d\,h\,q\,r\right )}{a\,c\,h^3-a\,d\,g\,h^2-b\,c\,g\,h^2+b\,d\,g^2\,h}-\frac {\ln \left (e\,{\left (f\,{\left (a+b\,x\right )}^p\,{\left (c+d\,x\right )}^q\right )}^r\right )\,\left (x+\frac {g}{h}\right )}{{\left (g+h\,x\right )}^2}-\frac {b\,p\,r\,\ln \left (a+b\,x\right )}{a\,h^2-b\,g\,h}-\frac {d\,q\,r\,\ln \left (c+d\,x\right )}{c\,h^2-d\,g\,h} \]

[In]

int(log(e*(f*(a + b*x)^p*(c + d*x)^q)^r)/(g + h*x)^2,x)

[Out]

(log(g + h*x)*(b*c*h*p*r - g*(b*d*p*r + b*d*q*r) + a*d*h*q*r))/(a*c*h^3 - a*d*g*h^2 - b*c*g*h^2 + b*d*g^2*h) -
 (log(e*(f*(a + b*x)^p*(c + d*x)^q)^r)*(x + g/h))/(g + h*x)^2 - (b*p*r*log(a + b*x))/(a*h^2 - b*g*h) - (d*q*r*
log(c + d*x))/(c*h^2 - d*g*h)